import request from '@/utils/request'

// 暴露12个函数 
// 用户模块  一共有12个接口
export const checkLogin = (data)=>{
    return  request.post('/users/checkLogin',data)
}
// get请求{params:data} 用params作为形参可以简写params  post请求data
// export const accountInfo = (params)=>{
//     return  request.post('/users/accountinfo',{params})
// }
export const accountInfo = (data)=>{
    return  request.get('/users/accountinfo',{params:data})
}

export const accountList = (params)=>{
    return  request.get('/users/list',{params})
}
export const accountDel = (params)=>{
    return  request.get('/users/del',{params})
}
// /users/edit 修改账号信息
export const accountEdit = (data)=>{
    return  request.post('/users/edit',data)
}
// /users/add 添加账号
export const accountAdd = (data)=>{
    return  request.post('/users/add',data)
}
// 修改密码 /users/editpwd
export const accountEditPwd = (data)=>{
    return  request.post('/users/editpwd',data)
}
// 验证旧密码 /users/checkoldpwd
export const accountCheckoldpwd = (data)=>{
    return request.get('/users/checkoldpwd',{params:data})
}



// 批量删除 /users/batchdel
export const accountBatchDel = (params)=>{
    return  request.get('/users/batchdel',{params})
}